package com.lyf.design.learn.j2e.businessdelegate;

/**
 * @author LYF
 * @date 2022/6/27
 */
public class BusinessDelegate {
    BusinessLookup businessLookup=new BusinessLookup();
    BusinessService businessService;
    String type;

    // 存在的问题
    public void setType(String type) {
        this.type = type;
        businessService = businessLookup.process(type);
    }

    void doTask(){
        // 使用业务----
        businessService.process();
    }

}
